package shisheng;

import retu.*;

import java.util.Scanner;

public class Student extends Common{
    private String name;
    public Student(String name){
        super(name);
        this.name = name;
        this.iOperations = new IOperation[] {
                new ExitOperation(),
                new LeaveOperation(),
                new ReturnOperation(),
                new ShowOpertion(),
        };
    }
    public int menu() {
        System.out.println("+-------------------------+");
        System.out.println("欢迎["+name+"]到离返校系统!");
        System.out.println("1.离开学校");
        System.out.println("2.返回学校");
        System.out.println("3.显示离校状况");
        System.out.println("0.退出程序");
        System.out.println("+-------------------------+");
        System.out.print("请输入你的选择:>");
        Scanner scanner = new Scanner(System.in);
        int choice = scanner.nextInt();
        return choice;
    }
}
